package drds.datasource.connection_pool.api;

import java.sql.DatabaseMetaData;
import java.sql.Savepoint;

public interface Connection {

    void close() throws SqlException;

    boolean isClosed() throws SqlException;


    //

    String getCatalog() throws SqlException;

    //
    void setCatalog(String catalog) throws SqlException;

    DatabaseMetaData getDatabaseMetaData() throws SqlException;

    boolean getAutoCommit() throws SqlException;

    //
    void setAutoCommit(boolean autoCommit) throws SqlException;

    void commit() throws SqlException;

    void rollback() throws SqlException;
    //

    Savepoint setSavepoint() throws SqlException;

    Savepoint setSavepoint(String name) throws SqlException;

    void rollback(Savepoint savepoint) throws SqlException;

    void releaseSavepoint(Savepoint savepoint) throws SqlException;

    //
    Statement createStatement() throws SqlException;

    PreparedStatement prepareStatement(String sql)
            throws SqlException;

    PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
            throws SqlException;


}
